Lecture 1 Course Overview & Introduction

GEOG4070/5070 Spatial Analysis and Modeling
Spring 2026

Instructor

Contact Info.

  • Dr. Haifeng (Felix) Liao; email: hliao@uidaho.edu
  • McClure Hall 303C
  • Phone: 208-885-6452

Office Hours: Tuesdays 3 pm - 5 pm on Zoom and/or in the office

Objectives

  • Interpret and evaluate statistical theories and methods of geospatial data analytics


  • Use R or other programming language to design and implement typical geospatial analysis methods


  • Effectively visualize and interpret the outcome of geospatial analysis

Course Materials

  • Canvas course site and Github repo.
  • Lecture web pages or slides (posted on Canvas and the course Github repo.)
  • Tutorials with embedded R examples and laboratory exercises
  • R “packages” for advanced analyses
  • Reading materials including chapters from recommended textbooks (PDFs posted on Canvas)

Readings and references

Concepts in statistics and spatial analysis

Readings and references (cont.)

Concepts in statistics and spatial analysis

Readings and references (cont.)

Workbooks or practicals

Software

Topics

  1. Basics of descriptive statistics
  2. Mapping w R and spatial descriptive statistics
  3. Basics of inferential statistics
  4. Spatial analysis of point patterns
  5. Spatial analysis of areal data (or lattice analysis)
  6. Regression and cluster analysis of (spatial) attribute data
  7. Spatial and geographically weighted regression
  8. Spatial machine learning (geographical random forest and other Geographical ML models)

Assessment/Grading

GEOG4070:

  • Lab exercises (6 out of 8): 60%
  • Take home exams (2): 24%
  • Final project/practical (1): 16%
  • Extra credit: <10%

GEOG5070:

  • Lab exercises (6 out of 8): 60%
  • Research article reviews (2): 4%
  • Take home exams (2): 20%
  • Final project/research poster (1): 16%
  • Extra credit <10%

Introduction: The Context of Statistical Analysis

  • What is empirical research and why statistical analysis?
  • Pros and cons of statistical or numerical analysis
  • Descriptive vs. inferential statistics
  • The scientific method and what is special for spatial analysis/statistics
  • An example of spatial analysis w R

Setting the Stage: Empirical Research

  • Empirical –based on, concerned with, or verifiable by observation or experience rather than theory or pure logic
  • Empirical method: the approach of using a collection of data to base theory or derive a conclusion
  • Statistics: the collection, analysis, interpolation and presentation of quantitative data

What are the main strengths of quantitative research/statistics?

  • Pros: Objectivity, Replication, Comparison and Aggregation
  • It allows us to repeat the experiments in different times or different places
  • And by doing so, it discovers patterns, regularities and trends
  • It further allows us to compare across places and times
  • It provides a systematic ways to deal with outliners and see larger tendencies in the data

After all, it is a world made for humans!

Two Branches of Statistical Methods

Descriptive statistics: concerned with the summarization, organization and presentation of data;

Types: Numerical, Tabular, Graphical, Cartographic (e.g., choropleth mapping)

Two Branches of Statistical Methods (cont.)

  • Inferential statistics: making generalization statements about the population based on observations made on a sample
  • Hypothesis testing: determining if an observed pattern or process in the samples is likely to be true in the population

Descriptive and Inferential Statistics

Descriptive and Inferential Statistics (cont.)

  • Descriptive Statistics -> considered exploratory
  • You perform descriptive statistics when you wish to discover new trends or patterns in the data
  • Inferential Statistics –> considered confirmatory
  • You use inferential statistics when you want to confirm a hypothesis
  • In practice these two approaches are used in tandem, as seen in the scientific method

You try it!

The Scientific Method

  • The scientific method gives us a means by which to approach the problems we wish to solve


  • The core of this method is the forming and testing of hypotheses


  • Statistics helps us choose how to observe, describe, test, and organize!

Statistics in GIS Spatial Analysis

  • Often similar to other disciplines
  • Data formats and creation methods (GIS data, vector, raster, etc.)
  • Individual “observations” have locational information attached to them
  • Most statistical packages do not explicitly recognize spatial attributes
  • Spatial statistics: E.g., spatial analysis and reasoning, spatial interpolation, spatial modeling

Example of GIS Spatial Analysis

  • John Snow (1813-1858)

  • A British physician, considered “father of modern epidemiology”

  • Conducted disease mapping for the London cholera epidemic in 1854

Visualizing the cholera death data w point density description

Code
#if(!require("HistData")) install.packages("HistData", dependencies = TRUE)
library("HistData")
data(Snow.deaths)
data(Snow.streets)
SnowMap(density=TRUE,main="Snow's Cholera Map, Death Intensity" )

Code
#dev.off()
plot(Snow.deaths[,c("x","y")], col="red", pch=19, cex=.7,xlab="", ylab="", xlim=c(3,20), ylim=c(3,20))
slist <- split(Snow.streets[,c("x","y")],as.factor(Snow.streets[,"street"]))
invisible(lapply(slist, lines, col="grey"))

require(KernSmooth)
kde2d <- bkde2D(Snow.deaths[,2:3], bandwidth=c(0.5,0.5))
contour(x=kde2d$x1, y=kde2d$x2,z=kde2d$fhat, add=TRUE)

clrs=colorRampPalette(c(rgb(0,0,1,0), rgb(0,0,1,1)), alpha = TRUE)(20)
image(x=kde2d$x1, y=kde2d$x2,z=kde2d$fhat, add=TRUE,col=clrs)
contour(x=kde2d$x1, y=kde2d$x2,z=kde2d$fhat, add=TRUE)

Voronoi polygon

Code
#library(installr)
#rm(list=ls())    # starts a fresh workspace
#uninstall.packages("cholera")
#library(knitr)
#install.packages("cholera")
#remotes::install_github("lindbrook/cholera", build_vignettes = TRUE)
library("parallel")
library("cholera")
snowMap()

Code
#dev.off()
plot(neighborhoodVoronoi())

Comparing the real-world distribution to a hypothetical(expected) one

Code
counts_voronoi <- neighborhoodVoronoi()
# Create table of "Actual vs Expected" 
voronoi_actvpred <- matrix(0,nrow=14,ncol=5)
colnames(voronoi_actvpred) <- c("pump.id","Actual","Area %","Expected","Pearson")
rownames(voronoi_actvpred) <- c("Market Place","Adam and Eve Court","Berners Street","Newman Street","Marlborough Mews",
                           "Little Marlborough Street","Broad Street","Warwick Street","Bridle Street","Rupert Street",
                           "Dean Street","Tichborne Street","Vigo Street","Total")
# Populate the table from the "counts_voronoi"
voronoi_actvpred[1:13,"pump.id"] <- counts_voronoi$expected.data[,1]
voronoi_actvpred[1:13,"Actual"] <- summary(counts_voronoi)       # the actual counts (summing across neighborhoods??)
voronoi_actvpred[1:13,"Area %"] <- counts_voronoi$expected.data[,3]  # pump neighborhoods as % of total area
voronoi_actvpred["Total","Actual"] <- sum(voronoi_actvpred[1:13,"Actual"])  # Calculate total counts and area (area should be 1.0)
voronoi_actvpred[1:13,"Expected"] <- voronoi_actvpred[1:13,"Area %"] * voronoi_actvpred["Total","Actual"]  # Calculate Expected = %area * total counts
voronoi_actvpred[1:13,"Pearson"] <- ((voronoi_actvpred[1:13,"Actual"] - voronoi_actvpred[1:13,"Expected"])^2) / 
  voronoi_actvpred[1:13,"Expected"] 
voronoi_actvpred[1:13,"Area %"] <- 100*voronoi_actvpred[1:13,"Area %"]    # Convert from decimal to percent
voronoi_actvpred["Total",c("Expected","Pearson","Area %")] <- colSums(voronoi_actvpred[1:13,c("Expected","Pearson","Area %")])    
Code
# Sum of squares for Pearson chi-squared statistic
knitr::kable(voronoi_actvpred,digits=1,caption="Actual versus Expected Deaths by Voronoi Pump Neighborhood",format='pandoc')
Code
knitr::kable(
  voronoi_actvpred,
  digits = 1,
  caption = "<span style='font-size: 1.5em; font-weight: bold;'>Actual versus Expected Deaths by Voronoi Pump Neighborhood</span>",
  format = "html"
)
Actual versus Expected Deaths by Voronoi Pump Neighborhood
pump.id Actual Area % Expected Pearson
Market Place 1 0 6.1 19.5 19.5
Adam and Eve Court 2 1 1.9 6.2 4.4
Berners Street 3 10 4.4 14.0 1.1
Newman Street 4 13 9.5 30.4 10.0
Marlborough Mews 5 3 8.2 26.5 20.8
Little Marlborough Street 6 39 12.4 39.9 0.0
Broad Street 7 182 8.5 27.2 881.5
Warwick Street 8 12 6.9 22.1 4.6
Bridle Street 9 17 4.8 15.5 0.1
Rupert Street 10 38 5.9 19.0 19.1
Dean Street 11 2 7.7 24.6 20.8
Tichborne Street 12 2 9.2 29.7 25.8
Vigo Street 13 2 14.5 46.4 42.5
Total 0 321 100.0 321.0 1050.2

What is next?

  • Now, we have to ensure that you have installed R studio and R that we will be using all semester.

  • Next week we will start talking about the basic terms and concepts in statistical analysis and the characteristics of spatial data and data classification.

  • On next Thursday, we will start working on the first practical on getting started with R studio!

Readings or Acknowledgements

  • Chapter 1 Introduction in the required text (see the PDF copy of the book posted on canvas)
  • Prof. Jerry Shannon’s Data Science in Geography course at U. of Georgia
  • Prof. Steve Farber’s Geographical Analysis course at U. of Utah (now at U. of Toronto)